In situ immobilization